/******************************************************************************/
/*  Class PROCESSOR                                                           */
/*  PO: S. Maslyakov, rusoil.9@gmail.com                                      */
/*                                                                            */
/*  Revision:     1.0                                                         */
/*  Date:         2011/02/15 15:03:33                                         */
/******************************************************************************/


#ifndef __PROCESSOR_H
#define __PROCESSOR_H


#include "data_types.h"
#include "Processor\processor_def.h"


//==============================================================================
//  Class PROCESSOR
//==============================================================================
class PROCESSOR
{
public:
  static void Init_Processor();
  static void Init_proc_task();
  static void * Get_proc_event();
  static void Activate_proc_task();
  static uint32_t GetDataSize(const uint32_t _dataType);

private:
  static void Init_rtos_part();
  static void Task_proc(void * par);
  static void ConvertSignData(const uint32_t _type, __UNION_DWORD * const _pData);
  static void PlusUU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusUS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusUF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusSU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusSS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusSF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusFU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusFS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void PlusFF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusUU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusUS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusUF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusSU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusSS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusSF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusFU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusFS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MinusFF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultyUU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultyUS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultyUF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultySU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultySS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultySF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultyFU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultyFS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void MultyFF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideUU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideUS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideUF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideSU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideSS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideSF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideFU(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideFS(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static void DivideFF(__UNION_DWORD * _f, const __UNION_DWORD * _s);
  static uint32_t ReadRec(__ACTION_SETT_PROC * const _pRec, const uint32_t _index);
  static uint32_t GetFuncInd(const uint32_t _type);
  static bool_t ReadArg(const __CELL_PROC * const _pCell, __UNION_DWORD * const _pDst);
  static void SaveResult(const __CELL_PROC * const _pCell, __UNION_DWORD * const _pSrc);
  static void PerfomAction(const __ACTION_SETT_PROC * const _pRec);
  static void RunPlusFunc(const uint32_t _ind,
                          __UNION_DWORD * _f,
                          const __UNION_DWORD * _s);
  static void RunMinusFunc(const uint32_t _ind,
                           __UNION_DWORD * _f,
                           const __UNION_DWORD * _s);
  static void RunMultyFunc(const uint32_t _ind,
                           __UNION_DWORD * _f,
                           const __UNION_DWORD * _s);
  static void RunDivideFunc(const uint32_t _ind,
                            __UNION_DWORD * _f,
                            const __UNION_DWORD * _s);
};
//==============================================================================
//==============================================================================


#endif